#! /bin/bash

XSL=yed2tikz.xsl
XML=$1
TEX=`echo $1 | sed -e 's/graphml/tex/'`

echo "\documentclass{standalone}
\usepackage{tikz}
% We need lots of libraries...
\usetikzlibrary{
arrows,
%calc,
%fit,
%patterns,
%plotmarks,
shapes.geometric,%
%shapes.misc,
%shapes.symbols,
%shapes.arrows,
%shapes.callouts,
%shapes.multipart,
%shapes.gates.logic.US,
%shapes.gates.logic.IEC,
%circuits.logic.US,
%circuits.logic.IEC,
%circuits.logic.CDH,
%circuits.ee.IEC,
%datavisualization,
%datavisualization.formats.functions,
%er,
%automata,
%backgrounds,
%chains,
%topaths,
%trees,
%petri,
%mindmap,
%matrix,
%calendar,
%folding,
%fadings,
%shadings,
%spy,
%through,
%turtle,
positioning,%
%scopes,
%decorations.fractals,
%decorations.shapes,
%decorations.text,
%decorations.pathmorphing,
%decorations.pathreplacing,
%decorations.footprints,
%decorations.markings,
%shadows,
%lindenmayersystems,
%intersections,
%fixedpointarithmetic,
%fpu,
%svg.path,
%external,
}%
\begin{document}
" > $TEX 

xsltproc $XSL $XML >> $TEX 2>/dev/null

echo "\end{document}" >> $TEX
